package com.hospital.hospitalsystem.modules.hospital.service;

import com.hospital.hospitalsystem.modules.hospital.dao.entity.DoctorOrderDetailEntity;
import com.hospital.hospitalsystem.modules.hospital.dao.mapper.DoctorOrderDetailMapper;
import com.hospital.hospitalsystem.modules.user.dto.OrderDetailExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author qiancheng@cqxyy.net
 * @date 2023/2/23
 */
@Component
public class DoctorOrderDetailService {

    @Autowired
    private DoctorOrderDetailMapper doctorOrderDetailMapper;

    public void insertSelective(DoctorOrderDetailEntity doctorOrderDetailEntity){
        doctorOrderDetailMapper.insertSelective(doctorOrderDetailEntity);
    }

    public int deleteByExample(Example example){
        return doctorOrderDetailMapper.deleteByExample(example);
    }

    public List<DoctorOrderDetailEntity> selectDetail(List<OrderDetailExt> list) {
        return doctorOrderDetailMapper.selectDetail(list);
    }

    public DoctorOrderDetailEntity selectOneByExample(Example example){
        return doctorOrderDetailMapper.selectOneByExample(example);
    }

    public void updateByPrimaryKeySelective(DoctorOrderDetailEntity doctorOrderDetailEntity){
        doctorOrderDetailMapper.updateByPrimaryKeySelective(doctorOrderDetailEntity);
    }
}
